import request from "@/utils/request";

// 查询商品扣点列表
export function listCashback(query) {
  return request({
    url: "/commodity/bankPrice/list",
    method: "get",
    params: query,
  });
}

// 查询商品扣点详细
export function getCashback(id) {
  return request({
    url: "/commodity/bankPrice/" + id,
    method: "get",
  });
}

// 新增商品扣点
export function addCashback(data) {
  return request({
    url: "/commodity/bankPrice/add",
    method: "post",
    data: data,
  });
}

// 修改商品扣点
export function updateCashback(data) {
  return request({
    url: "/commodity/bankPrice/edit",
    method: "put",
    data: data,
  });
}

// 删除商品扣点
export function delCashback(id) {
  return request({
    url: "/commodity/bankPrice/" + id,
    method: "delete",
  });
}
